package bluetooth.data;

import java.util.ArrayList;
import java.util.List;

import bluetooth.model.Category;
import bluetooth.model.Product;

import com.google.gson.Gson;

public final class DataFactory {

	public static String getJsonData (){
		
	 List<Product> products = new ArrayList<Product> ();
		
		Product product;
		Category category;
		
		for(int i=1; i<10; i++){
			
			product = new Product ();
			product.setId(i);
			product.setName("Name"+i);
			product.setPrice(5.0);
			
			category=new Category();
			category.setId(i);
			category.setName("Category"+i);
		
			product.setCategory(category);
			products.add(product);
			
		}
		
		String json = new Gson().toJson( products);
		///json +="\r\n";
		return json;
	}
	
}
